C-strider: type-aware heap traversal for C
نویسندگان
چکیده
Researchers have proposed many tools and techniques that work by traversing the heap, including checkpointing systems, heap profilers, heap assertion checkers, and dynamic software updating systems. Yet building a heap traversal for C remains difficult, and to our knowledge extant services have used their own application-specific traversals. This paper presents C-strider, a framework for writing C heap traversals and transformations. Writing a basic C-strider service requires implementing only four callbacks; C-strider then generates a program-specific traversal that invokes the callbacks as each heap location is visited. Critically, C-strider is type aware—it tracks types as it walks the heap, so every callback is supplied with the exact type of the associated location. We used C-strider to implement heap serialization, dynamic software updating, heap checking, and profiling, and then applied the resulting traversals to several programs. We found Cstrider requires little programmer effort, and the resulting services are efficient and effective. Copyright © 2014 John Wiley & Sons, Ltd.
منابع مشابه
Effects of Pregnant Leach Solution Temperature on the Permeability of Gravelly Drainage Layer of Heap Leaching Structures
In copper heap leaching structures, the ore is leached by an acidic solution. After dissolving the ore mineral, the heap is drained off in the acidic solution using a drainage system (consisting of a network of perforated polyethylene pipes and gravelly drainage layers) and is, then, transferred to the leaching plant for copper extraction where the copper is extracted and the remaining solution...
متن کاملAn Empirical Study of Heap Traversal and Its Applications
The heap is a very fundamental data structure used in many application programs as well as in system software. In this paper, we propose a heap traversal algorithm which visits the nodes of a binary heap in ascending order of the key values stored in the nodes. We demonstrate two implementations of the heap traversal algorithm, using a binary search tree or a binary heap as the auxiliary struct...
متن کاملIn-place update with linear types or How to compile functional programs into malloc()-free C
Synopsis: We show how linear typing can be used to write C functions which modify their heap allocated arguments in a functional way without explicit “pointer surgery.” We present this both as a “design pattern” for writing C-code in a functional style and as a compilation process from linearly typed first-order functional programs into malloc()-free C code. The main technical result is the cor...
متن کاملInorder Traversal of a Binary Heap and its Inversion in Optimal Time and Space
In this paper we derive a linear-time, constant-space algorithm to construct a binary heap whose inorder traversal equals a given sequence. We do so in two steps. First, we invert a program that computes the inorder traversal of a binary heap, using the proof rules for program inversion by W. Chen and J.T. Udding. This results in a linear-time solution in terms of binary trees. Subsequently, we...
متن کاملA framework for describing recursive data structure topologies in Coq
This paper presents an axiomatic framework in Coq for verifying invariants on heap data structures such as lists and trees in a C-like language with a low-level store model. The goal of the framework is to detect common errors such as memory leaks, dangling pointers and looped data structures. The framework provides a language for expressing invariants, and a set of inference axioms for verifyi...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Softw., Pract. Exper.
دوره 46 شماره
صفحات -
تاریخ انتشار 2016